<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<title>
			岳阳楼
		</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script src="{{__PUBLIC__}}/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="{{__PUBLIC__}}/bootstrap/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/bootstrap/css/bootstrap.css"/>
		<link rel="stylesheet" href="public/kindeditor/themes/default/default.css" />
		<script src="public/kindeditor/kindeditor.js"></script>
		<script src="public/kindeditor/lang/zh_CN.js"></script>
		<script src="{{__PUBLIC__}}/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=WcqLYXBH2tHLhYNfPNpZCD4s"></script>
		<script type="text/javascript" src="public/js/map.js"></script>
		<script type="text/javascript">var root = "{{__ROOT__}}";</script>
	</head>
	<body>
		<nav class="navbar navbar-default navbar-fixed-top" style="background: lightskyblue;">
			<div class="container-fluid container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar">
						</span>
						<span class="icon-bar">
						</span>
						<span class="icon-bar">
						</span>
					</button>
					<a class="navbar-brand" href="#" style="display: inline-block; padding: 0 0;">
						<img src="{{__VIEW__}}/Index/images/yueyanglou.jpg" style="width: 56px;height: 50px;" class="img-responsive" alt="Responsive image">
					</a>
				</div>
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav navbar-right">
						<li>
							<a href="#">
								会员注册
							</a>
						</li>
						<li>
							<a href="#">
								会员登录
							</a>
						</li>
						<form class="navbar-form navbar-left" role="search">
							<div class="form-group">
								<input type="text" class="form-control" placeholder="菜品">
							</div>
							<button type="submit" class="btn btn-default">
								选择菜品
							</button>
						</form>
					</ul>
				</div><!-- /.navbar-collapse -->
			</div><!-- /.container-fluid -->
		</nav>
		<nav class="navbar navbar-default" style="background: blue;margin-top: 52px;">
			<div class="container" style="background: yellow;padding: 0 0;">
				<div class="carousel slide" id="carousel-442224">
					<div class="carousel-inner">
						<div class="item active">
							<img alt="" src="{{__VIEW__}}/Index/images/y1.jpg">
						</div>
						<div class="item">
							<img alt="" src="{{__VIEW__}}/Index/images/y2.jpg">
						</div>
						<div class="item">
							<img alt="" src="{{__VIEW__}}/Index/images/y3.jpg">
						</div>
					</div>
					<a class="left carousel-control" data-slide="prev" href="#carousel-442224">
						‹
					</a>
					<a class="right carousel-control" data-slide="next" href="#carousel-442224">
						›
					</a>
				</div>
			</div>
		</nav>
		<section class="navbar navbar-default">
			<div class="container table-responsive" class="dp" style="padding: 20px 0;">
				{{foreach from="$data" key="$k" value="$v"}}
				<table class="table" border="" cellspacing="" style="font-size: 14px;margin-bottom: 15px;" cellpadding=""  lng="{{$v['lng']}}" lat="{{$v['lat']}}">
					<tr>
						<td rowspan='4' style="width: 120px;">
							<img src="{{$v['thumb']}}" style="width:100px;height:130px;margin: 0 auto;"/>
						</td>
						<td>
							距离 {{$v['name']}} 
							<span>
							</span> 米
						</td>
					</tr>
					<tr>
						<td>
							订餐电话:23434344
						</td>
					</tr>
					<tr>
						<td>
							地址:北京市丰台区看丹桥
						</td>
					</tr>
					<tr>
						<td>
							<a href="{{U('lists',array('dpid'=>$v['id']))}}">
								开始订餐
							</a>
						</td>
					</tr>
				</table>
				{{endforeach}}
			</div>
		</section>
		<!--<div id="" style="height: 200px;">
		</div>-->
		<script type="text/javascript">$(function() {
	getGeolocation(function(point) {
		var lng2 = point.lng;
		var lat2 = point.lat;
		$('.table').each(function(i) {
			var lng1 = $(this).attr('lng');
			var lat1 = $(this).attr('lat');
			pos = {
				lng1: lng1,
				lat1: lat1,
				lng2: lng2,
				lat2: lat2
			};
			$(this).find('span').html(getDistance(pos));
		});
	})
})</script>
	</body>
</html>
